<?php 
if ( ! defined('BASEPATH')) exit('No direct script access allowed');


    function format_date($time) //input format: yyyy-mm-dd
	{
		return date("d/m/Y",strtotime($time)); 
	}
	
	function change2ymd($date) //input format: d/m/yy or yyyy
	{
		$dtmp = explode("/",$date);
		$dadate = mktime(0,0,0,$dtmp[1],$dtmp[0],$dtmp[2]);
		return date('Y-m-d',$dadate);
	}
	
?>